// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import utils from './utils'
import vuex from 'vuex'
import vueRouter from 'vue-router'
import { Icon,Dialog,Toast} from 'vant';
import store from './store/index'

import { _utils } from '@/utils/index.js' // 注入私有插件集合
import 'lib-flexible'  //px
import {  ToastPlugin,Loading ,LoadingPlugin ,ConfirmPlugin,XHeader } from 'vux'

import {http} from '@/http'
import axios from 'axios'
import BaiduMap from 'vue-baidu-map'


Vue.use(BaiduMap, {
  /* 需要注册百度地图开发者来获取你的ak */
  ak: 'HtQ5fGSiGEbNpI5V851CatYg4D3iHDyR'
})
Vue.prototype.$axios = axios
Vue.use(_utils)
Vue.use(http)
Vue.use(vuex)
Vue.use(Icon)
Vue.use(Dialog)
Vue.use(Toast)
Vue.use(vueRouter)
Vue.use(ToastPlugin)
Vue.use(LoadingPlugin)
Vue.use(ConfirmPlugin);
Vue.component('loading', Loading)
Vue.component('x-header', XHeader)
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  utils,
  components: { App },
  template: '<App/>'
})
